#include "Object.h"
#include "../SGD Wrappers/CSGD_TextureManager.h"

#define CELL_WIDTH_HEIGHT 32
Object::Object()
{
}


Object::~Object()
{
}

void Object::Initialize(int row, int column, TSTRING file_path, TSTRING description){
	//Set Debug mode - default false
	debug = false;

	//Setting position
	this->row = row;
	this->column = column;
	SetPosX(row * CELL_WIDTH_HEIGHT);
	SetPosY(row * CELL_WIDTH_HEIGHT);

	//Setting image statistics
	this->image_file_path = file_path;
	this->description = description;

	//Loading image
	image_id = CSGD_TextureManager::GetInstance()->LoadTexture(file_path.c_str());

}

void Object::Update(float fElapsedTime){
	//May not be needed
}
void Object::Render(){
	RECT image_rect = { 0, 0, GetWidth(), GetHeight() };

	CSGD_TextureManager::GetInstance()->Draw(image_id, GetPosX(), GetPosY(), 1.0f, 1.0f, &image_rect);
}

void Object::HandleCollision(const IEntity* pOther){
	//May not be needed
}
